home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / pmgb202.zip / PMGLOBE.DOC < prev    next >
Text File  |  1992-09-25  |  22KB  |  469 lines

  1.  
  2. PMGlobe -- an OS/2 Presentation Manager World Globe
  3. ===================================================
  4.  
  5. Copyright (c) IBM Corporation, 1991, 1992.
  6.  
  7. Introduction
  8. """"""""""""
  9. PMGlobe is a program which displays the Earth as a globe using OS/2
  10. Presentation Manager.  You can choose to view the globe from any
  11. direction, or select one of a number of 'standard' views.
  12.  
  13. In addition to simply displaying a picture of the world, PMGlobe will
  14. also let you light the globe as though by sunlight -- so you can see
  15. at a glance those areas of the globe where the sun has risen, and where
  16. it is night.  Additional options add shading to the globe for a
  17. three-dimensional effect, and let you measure distances between
  18. two points on the globe.  Other features are described in detail below.
  19.  
  20. With the command interface included with PMGlobe, you can add markers,
  21. labels, and clocks to the globe and have more control over its actions.
  22. If you wish, you can use REXX (the scripting language included with
  23. OS/2) as a macro language for PMGlobe -- see PMGLOBEX.DOC for a
  24. description of the PMGlobe commands available; all of them can be used
  25. in a REXX macro.
  26.  
  27.  
  28. Installation
  29. """"""""""""
  30. PMGlobe is a 32-bit application, and therefore requires OS/2 Version
  31. 2.  Only the file PMGLOBE2.EXE is needed, though you may wish to
  32. experiment with the sample macros (TEST.PMG and SPIN.PMG) or your own
  33. macros.  If using macros then they should be in the current working
  34. directory for PMGlobe.
  35.  
  36. It is recommended that PMGlobe be started from a program object
  37. contained in a folder or on the desktop.  One way of setting this up is:
  38.  
  39.  1. Copy a 'Program' object template from the OS/2 Templates folder to
  40.     your desired target folder.
  41.  2. On the new object, click mouse button 2, select the [->] button on
  42.     'Open', then select 'Settings'.  This should open the settings
  43.     notebook.
  44.  3. On the 'Program' page enter the path and file name of PMGLOBE2.EXE,
  45.     and, for 'Working Directory', the directory in which you have placed
  46.     the sample macros.
  47.  4. On the 'General' page, change the title to whatever you wish (e.g.,
  48.     PMGlobe), and un-check the 'Template' check box.
  49.  5. Close the settings notebook.  Clicking on the Globe item should then
  50.     start PMGlobe.
  51.  
  52. If, for that program object, you choose the setting "Minimize window to
  53. desktop" (on the 'Window' page) then when minimized the globe will
  54. appear on the desktop as an icon, which will continue to be updated if
  55. (for example) you have selected sunlighting.
  56.  
  57.  
  58. Using the Mouse with PMGlobe
  59. """"""""""""""""""""""""""""
  60. When PMGlobe is the active window, mouse button 1 is used to select a
  61. geographical location on the globe, and mouse button 2 can be used to
  62. select a new point of view.  Specifically:
  63.  
  64. * Move the mouse pointer to any visible point on the globe and click
  65.   mouse button 1.  This will cause the 'Position and Distance
  66.   Calculator' to appear (if not already visible).  You can move the
  67.   calculator anywhere on the screen, just like any other window.
  68.   Then:
  69.  
  70.     1. The current position (Latitude and Longitude) of the mouse is
  71.     displayed if the mouse is over the globe.
  72.  
  73.     2. A single click of mouse button 1 records the current point on the
  74.     distance calculator.  Up to two points can be recorded: if two are
  75.     shown then the distance between them is also displayed, in
  76.     kilometres and miles.  (The distance shown is the 'Great Circle
  77.     Distance', that is, the shortest distance between the points when
  78.     moving over the surface of the globe.)
  79.  
  80.     3. A double click of mouse button 1 also records the current point
  81.     on the distance calculator, and makes it a 'fixed' (or 'base')
  82.     point.  This keeps that point visible on the calculator while you
  83.     select any number of other points.  You can set a new fixed point by
  84.     double-clicking mouse button 1 at another position.
  85.  
  86.   You can clear all selected points, including the fixed point, by
  87.   pressing the 'Reset' button on the calculator.
  88.   'Cancel' hides the calculator.
  89.  
  90. * Move the mouse pointer to any visible point on the globe and click
  91.   mouse button 2.  The globe will then be redrawn with that point at the
  92.   center of the view.
  93.  
  94.   Once you have found your preferred view, selection by mouse button 2
  95.   can be disabled from the 'Views' menu, if you wish, to avoid
  96.   accidental change of the view.
  97.  
  98.  
  99. Menu options
  100. """"""""""""
  101. The PMGlobe menu options can be selected from the Action Bar in the
  102. usual way, and fall into three groups (in addition to the Help panel
  103. index):
  104.  
  105.   'Options'  gives access to various miscellaneous settings
  106.   'Views'    is used to select what is seen, and from where
  107.   'Lighting' is used to choose the lighting effects and colors.
  108.  
  109. Each group (and each submenu in each group) has a summary 'Help' panel
  110. as its first selection.  The other selections are as follows:
  111.  
  112. 'Options' -- miscellaneous settings
  113.  
  114.   'Show position/distance calculator': when selected this makes the
  115.     position and distance calculator appear (it will also appear
  116.     automatically if you click on the window with mouse button 1).
  117.     See above for information on how to use the calculator.
  118.  
  119.   'Make window square': makes the window fit the globe on all edges,
  120.     if possible (it may not be possible on some narrow or low windows).
  121.     This is an instantaneous action; the window size and position is not
  122.     saved until you select 'Save windows' (see below), or PMGlobe is
  123.     closed, or OS/2 is shut down.
  124.  
  125.   'Make full screen': enlarges the window to fill the screen entirely,
  126.     so that the title and action bars and the frame are just off the
  127.     screen and so not visible.  You can still use OS/2 key combinations
  128.     to move the window, select action bar items, etc.  For example: F10
  129.     followed by "O" will pull down the 'Options' menu.
  130.  
  131.     This is an instantaneous action; the window size and position is not
  132.     saved until you select 'Save windows' (see below), or PMGlobe is
  133.     closed or shut down.
  134.  
  135.   'Make desktop': makes PMGlobe become (and remain) the bottom window;
  136.     that is, puts it behind all other windows.  Click anywhere visible
  137.     to bring PMGlobe to the foreground (after confirmation).  This does
  138.     not change the size of the window.  See below for more details.
  139.  
  140.   'Draw at low priority': requests that map drawing is carried out at
  141.     lower than normal priority, to minimize impact on other applications.
  142.     This is the default; if PMGlobe appears to halt drawing when (for
  143.     example) a communications program is running in a DOS session, try
  144.     de-selecting this option.
  145.  
  146.   'Halt macro': is enabled when a macro (see elsewhere) is running.  If
  147.     selected, any macros running are halted.  The Ctrl-Break key has the
  148.     same effect.
  149.  
  150.   'Set timezone': this pops up a dialog that lets you set the time zone
  151.     information.  You only need to do this for a 'sunlight' view, and
  152.     even then only need to do it once.  If no other program updates the
  153.     current time zone information then you may also have to change it
  154.     whenever you change the clock on your computer for daylight saving
  155.     (summer or winter) time.  PMGlobe assumes that your computer clock
  156.     is set to local time; the timezone dialog describes your local time
  157.     in terms of GMT (Greenwich Mean Time), and hence gives PMGlobe the
  158.     information that it needs to calculate the sun's position.
  159.  
  160.   'Set refresh time': this lets you choose how long PMGlobe will wait
  161.     after completing a view of the globe before it redraws it.  This
  162.     takes effect for the 'Sunlight' view (which needs regular updating
  163.     to give a useful picture) or if any clocks may be displayed.  The
  164.     refresh takes place shortly after the wall-clock time that is a
  165.     multiple of the selected refresh interval (for example, if 'One
  166.     Hour' is selected, the refresh should take place on the hour).
  167.  
  168.   'Save settings': this saves the settings you have selected; they will
  169.     then be used automatically when PMGlobe is next started.  See below
  170.     for details of which settings are saved; these are also saved
  171.     automatically when OS/2 is shut down or PMGlobe is closed.
  172.  
  173.   'Restore settings': restores settings to those last saved.
  174.  
  175.   'Reset settings to defaults': sets settings to the defaults used when
  176.     PMGlobe was first run.
  177.  
  178.   'Save windows': this saves the position and size of the main PMGlobe
  179.     window, and the position of the distance calculator.  These will
  180.     be used automatically when PMGlobe is next started, and are also
  181.     saved automatically when OS/2 is shut down or PMGlobe is closed.
  182.  
  183.   'Restore windows': restores the position and size of the windows to
  184.     those last saved.
  185.  
  186.   'Close': leaves PMGlobe.  The settings, window positions, etc., are
  187.     saved automatically (see below).
  188.  
  189. 'Views' -- where and what you see
  190.  
  191.   'Standard views': this gives you a choice of standard views (Europe &
  192.     Africa, Americas, India & Asia, Pacific, and the two Poles).  Use
  193.     mouse button 2 (see above) to select any point to be placed at the
  194.     center of the view.
  195.  
  196.   'Grid line choices': lets you choose which grid lines (if any) are to
  197.     be shown, and the color (one of fifteen) of the grid lines.
  198.  
  199.   'Snap to equator': this leaves the Longitude of the center of view
  200.     unchanged and sets the Latitude to zero (the equator).  Globe
  201.     drawing is faster when the Latitude of the center of view is zero
  202.     than when globe is tilted.
  203.  
  204.   'Snap to Greenwich': sets the Longitude of the center of to zero (the
  205.     Prime Meridian) while leaving the Latitude unchanged.  This has no
  206.     effect on drawing time.
  207.  
  208.   'Allow mouse button 2': if selected, lets you rotate and tilt the
  209.     globe using Mouse Button 2 (see above).  It can be de-selected to
  210.     prevent accidental movement of the direction of view.
  211.  
  212. 'Lighting' -- how the globe is seen
  213.  
  214.   'Sunlight': asks for "sun lighting" of the globe.  This lets you see
  215.     at a glance which parts of the world are in daylight, and which are
  216.     in the dark.  This lighting is (of course) time dependent, so
  217.     PMGlobe needs to know the time zone you are in, and will ask you for
  218.     it if it is not already set.  If Sunlight is selected, the globe
  219.     will be redrawn at regular intervals (as selected via 'Set refresh
  220.     time', under 'Options').  See below for notes on the accuracy of the
  221.     time and sunlight information.
  222.  
  223.   'Sunlight from space': is similar to 'Sunlight', except that it is
  224.     more realistic -- you cannot see details on the dark side of the
  225.     earth except where lit by twilight. For best realism, choose a black
  226.     background, 3-D, astronomical twilight, and no grid lines (or
  227.     perhaps low-key grid lines, such as GREY).  This setting implies
  228.     (sets) 'Sunlight'.
  229.  
  230.   'Sunlight and starlight': shows the 'Sunlight from space' view, with
  231.     the land masses on the "dark side" of the earth made visible, too.
  232.     (If you cannot see them, turn up the brightness on your display.)
  233.  
  234.   '3-D': adds shading, to give the globe a "three-dimensional"
  235.     appearance.  On a VGA screen there are only two shades of green and
  236.     blue available, so this will give a rather grainy and mottled
  237.     appearance (especially if a Sunlight option is selected), so
  238.     this setting may not give an acceptable display.  On a BGA (8514),
  239.     or better screen and adapter, much smoother shading is possible.
  240.  
  241.   'Twilight settings': lets you select how much of the "dark side" of
  242.     the globe is to be shown when sun lighting is in effect.  When
  243.     theoretical sunrise/sunset is selected, the globe is lit as though
  244.     by a point source at the center of the sun: exactly half of the
  245.     globe is lit.  For the meaning of the other settings, see the
  246.     detailed notes below.
  247.  
  248.   'Land color': lets you select one of nine colors for land masses and
  249.     islands.  The default is Green, though Yellow and White are good
  250.     alternatives.
  251.  
  252.   'Water color': lets you select one of nine colors for lakes and seas.
  253.     The default is Blue; Gray is an alternative.
  254.  
  255.   'Background color': lets you select one of sixteen background colors.
  256.     A black background gives a nice 'deep space background' effect,
  257.     though may be a bit too much of a contrast for some tastes; you may
  258.     prefer Dark Blue.
  259.  
  260.  
  261. Data and time limits and accuracy
  262. """""""""""""""""""""""""""""""""
  263. The data used for presenting the globe are loaded in compressed form (a
  264. little less than 22 Kilobytes).  The coastline and lake data were
  265. compiled from a number of different sources, with some manual editing to
  266. improve the representation in critical areas such as narrow straits and
  267. isthmuses.  The accuracy of the coastline and other data is not
  268. guaranteed in any way, but is believed to be within 40km (25miles) in
  269. the worst case (near the equator) and significantly better in the
  270. East-West direction in Northern and Southern latitudes.
  271.  
  272. When the distance calculator is used, the mouse position can only be
  273. determined to the nearest pel (picture element) on the screen.  The
  274. longitude and latitude is then reported as being at the center of that
  275. pel.  Distance calculations between the two positions thus reported are
  276. then calculated from those coordinates and should be accurate to the
  277. nearest unit (km or mile), or 0.2%, whichever is greater.  The 0.2%
  278. limit is a consequence of assumption used in the calculation that the
  279. earth is spherical (which it is not).
  280.  
  281. Time and sun position calculations are only important when one of the
  282. 'Sunlight' options is selected.  In this case, PMGlobe needs to know the
  283. current date and time-of-day (taken from your computer's clock -- make
  284. sure it is set correctly).  It also needs to know which time zone you
  285. are in: if not already set it will ask you to set it (you may also need
  286. to change it if your computer clock is changed for daylight saving,
  287. summer, or winter time).
  288.  
  289. From the current time and time zone information, PMGlobe can determine
  290. apparent solar time (which is as much as 16 minutes different from the
  291. Civil time used for clocks) and hence the sun's position.  This is then
  292. used to display the globe as though lit by the sun: the light/dark
  293. dividing line thus shows where the sun is rising or setting.
  294.  
  295. The various calculations done should give an accuracy of sun position
  296. that leads to a sunset or sunrise indication that is correct to within
  297. twenty seconds of time.  Actual sunset or sunrise times will be a little
  298. different because of atmospheric effects, which vary with the time of
  299. year, the weather, and latitude.  However, PMGlobe does give a useful
  300. indication of sunrise and sunset, and of course lets you see at a glance
  301. which parts of the globe are in night or daylight.
  302.  
  303.  
  304. Twilight settings
  305. """""""""""""""""
  306. The sun is not a point source of light, and the atmosphere scatters its
  307. light, too.  Therefore, sunlight is seen on the "dark side" of the earth
  308. for some time before the sun rises and for some time after it sets.  You
  309. can select to see all, part, or none of this twilight zone on the globe.
  310.  
  311. Twilight, when shown, is always shown shaded.  On a VGA (standard)
  312. screen it can appear mottled or granular, because there are only two
  313. shades of each color available to PMGlobe.
  314.  
  315. The twilight settings provided only have an effect when 'Sunlight' is
  316. selected, and are:
  317.  
  318.   'Theoretical sunrise/set': this lights the earth as though by a point
  319.     source at the center of the sun; the sunrise/set line is shown as
  320.     though light ceased when the center of the sun crossed the horizon,
  321.     and so no twilight can be seen.
  322.  
  323.   'Ideal sunrise/set': this is a practical and generally accepted
  324.     definition (fifty minutes of angle after the theoretical
  325.     sunrise/set) which allows for the diameter of the sun and common
  326.     atmospheric effects.  The line seen on the globe joins the points
  327.     at which the disc of the sun will have just disappeared or be just
  328.     about to appear, and encloses a very narrow band of twilight.
  329.  
  330.   'Civil twilight': the boundary marks the end of "civil twilight" -- a
  331.     convenient point used for legal purposes (for example, when it is
  332.     too dark to carry out certain tasks).  Please note that PMGlobe's
  333.     rendering of this line must not be used for any critical or legal
  334.     decisions; errors and bugs are always possible, and the definition
  335.     used by PMGlobe (six degrees after the theoretical sunrise/set) may
  336.     not match the legal definition used in your country.
  337.  
  338.   'Naval twilight': the boundary indicates the points where it is dark
  339.     for all practical purposes: the center of the sun is twelve degrees
  340.     below the horizon.
  341.  
  342.   'Astronomical twilight': there is no boundary; light fades to zero,
  343.     where it is perfectly dark: no effects from sunlight can be
  344.     detected.  At this point, the center of the sun is eighteen degrees
  345.     below the horizon.
  346.  
  347.  
  348. Performance considerations
  349. """"""""""""""""""""""""""
  350. PMGlobe is designed as a '32-bit' application, with heavy use of long
  351. (32-bit) integers.  All computation is done using integers, so a math
  352. coprocessor is not required.
  353.  
  354. In general, the simpler the image presented the faster it is drawn.
  355. Selecting sunlight, 3-D, and twilight all slow down the drawing (but
  356. 'sunlight in space' is usually faster than 'sunlight' alone).
  357.  
  358. Non-equatorial (tilted) views take significantly longer to draw than
  359. equatorial views (hence the 'Snap to equator' option).
  360.  
  361. As a rough guide, the simplest (flat lighting, equatorial view, no
  362. sunlight) image with a diameter of 400 picture elements should take
  363. about 4-6 seconds to draw on a 25MHz 386 PC or PS/2.  The time taken
  364. is inversely proportional to the speed of the processor and proportional
  365. to the square of the image diameter.  The most complicated drawing (3-D
  366. shading, non-equatorial view, sunlight) might take about four times
  367. longer.
  368.  
  369.  
  370. Saved settings
  371. """"""""""""""
  372. The following settings are saved (in the system file "OS2.INI") when
  373. 'Save settings' is selected.  They are also automatically saved when
  374. PMGlobe is closed or if OS/2 is shut down while PMGlobe is running:
  375.  
  376.   Latitude and Longitude of the center point of the view
  377.   Grid (Meridians and Parallels) selections and color
  378.   Lighting selections (Sunlight, Sunlight from space, Starlight, 3-D)
  379.   Twilight selection (degrees)
  380.   Land, Water, and Background colors
  381.   Refresh (re-draw) interval.
  382.   Whether 'Desktop' is selected (globe will be bottom window)
  383.   Whether 'Draw at low priority' is selected
  384.   Whether mouse button two is active ('Allow mouse button 2')
  385.  
  386.   'Restore settings' restores all of these to the last saved values.
  387.   'Reset settings to defaults' sets all of these to the PMGlobe defaults.
  388.  
  389. The following settings are saved, also in OS2.INI, when 'Save windows'
  390. is selected, OS/2 is shut down, or PMGlobe is closed (unless the PMGlobe
  391. window is minimized or maximized):
  392.  
  393.   The position and size of the main (globe) window
  394.   The position of the 'Position/distance calculator' window.
  395.   The position of the 'Command dialog' window.
  396.  
  397.   'Restore windows' restores these to the values used when PMGlobe was
  398.   last started.
  399.  
  400. The following setting is saved in OS2.INI when Mouse button 1 is
  401. double-clicked on the globe:
  402.  
  403.   The latitude and longitude of the current 'fixed point'.
  404.  
  405.   This is cleared when 'Reset' is selected in the Position/distance
  406.   calculator.
  407.  
  408.  
  409. The 'Make Desktop' setting
  410. """"""""""""""""""""""""""
  411. The Desktop setting requests that PMGlobe will keep itself at the bottom
  412. of all the windows on the screen. Under OS/2 2.x the desktop icons are
  413. part of the desktop, and so PMGlobe cannot get "underneath" them;
  414. selecting both 'Make Desktop' and 'Make full screen' is therefore not
  415. advised as it would hide the desktop icons (unless you have moved them
  416. off the desktop and into a different folder).
  417.  
  418. Once on the desktop, the usual PMGlobe mouse functions are suspended.
  419. Clicking on PMGlobe will ask for confirmation before leaving the Desktop
  420. state.  If leaving the desktop and the globe and background window fills
  421. or is larger than the screen then PMGlobe will revert to the
  422. Presentation Manager default size and position when it leaves the
  423. desktop.
  424.  
  425. PMGlobe will remember the Desktop state (and window positions) when
  426. Shutdown by OS/2.  It can also be forced to start up on the Desktop by
  427. specifying the parameter 'DESKTOP' when starting PMGlobe, for example:
  428. "start pmglobe desktop".  To fill the screen, add the parameter
  429. 'FULLSCREEN' on startup.
  430.  
  431. Do not start two applications (such as certain "wallpaper" programs, or
  432. two instances of PMGlobe) that both attempt to remain on the desktop.
  433.  
  434.  
  435. Time Zone interface details
  436. """""""""""""""""""""""""""
  437. Personal computer operating systems have a variety of ways of holding
  438. timezone information (some compilers even build in a default
  439. geographical location!), but to date no standard mechanism has been
  440. defined.
  441.  
  442. PMGlobe introduces a new mechanism for holding timezone information.
  443. The current timezone offset, daylight savings offset, and timezone name
  444. is held in the system file "OS2SYS.INI" in a general format that any
  445. application can use and which can easily be accessed by application
  446. programs (for example, by C or REXX programs).
  447.  
  448. Specifically, the information is held as three words in the OS2SYS.INI
  449. file, under the name "TimeZone" with key "Active".  This string holds at
  450. least three words separated by exactly one blank, and with no leading
  451. blanks.   The third word will be followed by either a blank (to allow
  452. future extension) or the C 'end of string' null character.
  453.  
  454. The three words are:
  455.  
  456.   base-time-offset-from-GMT  summer-time-offset  zone-abbreviation
  457.  
  458. where the two times have the format [+|-][h]h[:[m]m[:[s]s]]] and the
  459. zone-abbreviation is either "???" (indicating unknown) or "xxx", where
  460. xxx are three or four uppercase alphabetics.  For example:
  461.  
  462.   +0:00 +1:00 BST
  463.  
  464. The total offset from GMT is the sum of the two time offsets.
  465.  
  466. -----------
  467.  
  468. Mike Cowlishaw, IBM UK Laboratories
  469.